package com.umiwe.utils;

/**
 * 封装状态
 * liximing
 */
public enum ResultCode {
    SUCCESS(200, "成功"),
    DENGLU_FAIL(201, "获取信息失败"),
    LOGIN_FAIL(202, "获取信息失败"),


    DEPARTMENT_ID(301,"部门id不能为空"),
    DEPARTMENT_FAIL(302,"执行失败"),


    USER_ID_NULL(601,"用户id为空"),
    USER_PASSWROD_NULL(602,"用户密码为空"),
    USER_TOKEN_NULL(603,"token为空"),
    USER_CODE(604,"code为空"),
    USET_UPDATA_FAIL(605,"修改密码失败"),



    SYSTEM_ERROR(10000, "系统异常，请稍后重试"),
    SYSTEM_NAME_NULL(10001,"系统不存在"),
    SYSTEM_ID_NULL(801,"系统id为空"),
    UNAUTHORIZED(10401, "签名验证失败"),
    PARAM_IS_INVALID(10001, "参数无效"),
    USER_HAS_EXISTED(20001, "用户名已存在"),
    USER_NOT_FIND(20002, "用户名不存在"),
    USER_LIST_FIDE(20003,"用户信息不存在"),

    ROLE_ID_NULL(30000,"当前用户没有对应的角色"),

    ROLE_PERMISSION_NULL(40000,"当前角色没有对应的权限"),

    RECORD_NULL(50000,"记录可能已经不存在");
    private Integer code;

    private String message;

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer code() {
        return this.code;
    }

    public String message() {
        return this.message;
    }
}
